package com.sdry.service.jyy;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.mapper.jyy.SheduMapper;
import com.sdry.mapper.jyy.ShedudetailMapper;
import com.sdry.mapper.llm.RoleMapper;
import com.sdry.model.jyy.Shedu;
import com.sdry.model.jyy.SheduExample;
import com.sdry.model.jyy.ShedudetailExample;
import com.sdry.model.jyy.ShedudetailExample.Criteria;
import com.sdry.model.llm.Role;

@Service
@Transactional
public class SheduServiseImpl implements SheduServise {
	
	@Resource
	private SheduMapper sheduMapper;
	@Resource
	private RoleMapper roleMapper;
	@Resource
	private ShedudetailMapper shedudetailMapper;

	@Override
	public int countByExample(SheduExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByExample(SheduExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return 0;
	}

	@Override
	public int insert(Shedu record) {
		return sheduMapper.insert(record);
	}

	@Override
	public int insertSelective(Shedu record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Shedu> selectByExampleWithBLOBs(SheduExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Shedu> selectByExample(SheduExample example) {
		return sheduMapper.selectByExample(example);
	}

	@Override
	public List<Shedu> selectByExampleWithBLOBsForStartPage(
			SheduExample example, Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Shedu> selectByExampleForStartPage(SheduExample example,
			Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Shedu> selectByExampleWithBLOBsForOffsetPage(
			SheduExample example, Integer offset, Integer limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Shedu> selectByExampleForOffsetPage(SheduExample example,
			Integer offset, Integer limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Shedu selectFirstByExample(SheduExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Shedu selectFirstByExampleWithBLOBs(SheduExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Shedu selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Shedu selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateByExampleSelective(Shedu record, SheduExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExampleWithBLOBs(Shedu record, SheduExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExample(Shedu record, SheduExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKeySelective(Shedu record) {
		return sheduMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(Shedu record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Shedu record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKeys(String ids) {
		int afact = 0;
		String[] split = ids.split(",");
		for (String s : split) {
			Long id = Long.valueOf(s);
			afact = sheduMapper.deleteByPrimaryKey(id);
		}
		return afact;
	}

	@Override
	public int deleteByPrimaryKeys2(String ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void initMapper() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<String> selectManager() {
		return sheduMapper.selectManager();
	}

	@Override
	public List<Role> selectAuthority(Long uid) {
		return roleMapper.getRoleByUserId(uid);
	}

	@Override
	public int deleteById(Long id) {
		return sheduMapper.deleteByPrimaryKey(id);
	}

}
